<template>
    <div class="taolistbg">
        <Freebj v-if="this.taoCanListData" :freebj="this.free"></Freebj>
        <!-- 日常保洁套餐 -->
        <Taocan :mealItems="mealItems" :mealSmallItems="mealSmallItems"></Taocan>
    </div>
</template>

<script>
import Freebj from '@/components/Freebj.vue'
import Taocan from '@/components/Taocan.vue'
import { mapState,mapActions } from 'vuex'
export default {
    created(){
        this.getTaoCanListData(this.$route.query);
    },
    data () {
        return {
            // taoliebiao: {}
        }
    },
    components:{
        Freebj,
        Taocan
    },
    methods:{
        ...mapActions({
            getCleanData:"baojieModules/getCleanData",
            getTaoCanListData:"baojieModules/getTaoCanListData"
        })
    },
    computed:{
        ...mapState({
            taoCanListData: state=> state.baojieModules.taoCanListData,
            taoList: state => state.taoList,
        }),
        free(){
            return this.taoCanListData ? this.taoCanListData.free : {};
        },
        mealItems(){
            return this.taoCanListData ? this.taoCanListData.setMealItems : {};
        },
        mealSmallItems(){
            return this.taoCanListData ? this.taoCanListData.setMealSmallItems : [];
        }
    },
    mounted () {
        // var sss = this.$route.query.id
        // this.taoliebiao = this.taoList[ sss ] || this.taoList[ 0 ]
        // console.log( this.taoliebiao )
    }
}
</script>

<style lang="scss" scoped>
.taolistbg{
    height: 100%;
    background: #ebebeb;
}
</style>

